package cn.lingyangwl.agile.system.model.rqrs.diy;

import cn.lingyangwl.agile.model.constants.ValidationCons;
import cn.lingyangwl.agile.model.module.dict.CusFieldBind;
import cn.lingyangwl.agile.model.module.dict.DictTypeCons;
import cn.lingyangwl.agile.system.constants.AppMenuCons;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * 移动端菜单
 *
 * @author shenguangyang
 */
@Getter
@Setter
public class DiyAppLinkBase {
    @ApiModelProperty(value = "唯一标识")
    private String code;

    @ApiModelProperty(value = "名称")
    private String name;

    /**
     * 当 {@link AppMenuCons.LinkType#COMP_MENU} 可能需要填写, 其他不必填写
     */
    @ApiModelProperty(value = "组件类型")
    private String component;

    /**
     * @see AppMenuCons
     */
    @ApiModelProperty(value = "类型")
    @CusFieldBind(type = DictTypeCons.APP_LINK_TYPE, target = "typeText")
    private String type;

    private String typeText;

    @ApiModelProperty(value = "手机端页面地址")
    private String pageUrl;

    @ApiModelProperty(value = "父级id")
    private Long parentId;

    @ApiModelProperty(value = "父级标识")
    private String parentCode;

    @NotNull(message = ValidationCons.NOT_EMPTY)
    @ApiModelProperty(value = "排序")
    private Integer sortNo;

    @ApiModelProperty(value = "状态(1-启用, 2: 禁用)")
    private String status;

    @ApiModelProperty(value = "备注")
    private String remark;
}
